package com.ksyun.cloudhostalarmprocessing.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * 告警规则枚举类
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum AlarmRules {
    DOWNTIME(1,"up","宕机"),
    THE_NUMBER_OF_HOST_CONNECTIONS_IS_TOO_HIGH(2,"node_netstat_Tcp_CurrEstab","主机连接数过高"),
    INSUFFICIENT_DISK_SPACE_REMAINING(3,"node_filesystem_free_bytes","磁盘空间剩余不足"),
    CPU_LOAD_TOO_HIGH_WITHIN_FIVE_MINUTES(4,"node_load5","5分钟内cpu负载过高"),
    LOW_SPACE_AND_MEMORY(5,"node_memory_MemFree_bytes","空间内存过低"),
    HOST_MEMORY_USAGE_EXCEEDS_80(6,"up","主机内存使用率超过80%"),
    THE_ENTRANCE_TRAFFIC_OF_THE_HOST_NETWORK_CARD_IS_TOO_HIGH(7,"up","主机网卡入口流量过高"),
    ;

    //状态码
    private Integer code;

    //指标名称
    private String metric;

    //告警项
    private String alarmItem;

}
